import Flutter
import UIKit

@main
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
      
      
      let controller : FlutterViewController = window?.rootViewController as! FlutterViewController
      
      
      let channel = FlutterMethodChannel(name: "com.michaeliu.flutter.study/method_channel", binaryMessenger: controller.binaryMessenger)
      
      channel.setMethodCallHandler({(call : FlutterMethodCall, result: FlutterResult) -> Void in
          
          if(call.method == "send") {
              result("111111111111")
          }
          
          
      })
      
      
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
}
